The present invention relates to a method and device for defining a keyboard layout, and in one embodiment, the invention provides for a redefine of a keyboard layout according to annotations in a specification for a restricted language.